<template>
	<view>
		<view class="fight_list_content" @click="onPageJump">
			<image :src="item.img" mode="aspectFill"></image>
			<view class="fight_list_details">
				<text class="title">{{item.name}}</text>
				<view class="name">{{item.shopName}}</view>
				<!-- <view class="ensure">极速退款</view> -->
				<view class="groupbuyinfo">
					<view class="price"><text>{{item.priceDiscount}}</text></view>
					<view class="number">
						<text>已拼{{item.numSales}}件</text>
						<!-- <image src="../../static/images/1.jpg" mode="aspectFill"></image>
						<image src="../../static/images/1.jpg" mode="aspectFill"></image> -->
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: Object,
				default () {
					return {};
				}
			},
			index: {
				type: Number,
				default () {
					return 0;
				}
			}
		},
		methods: {
			onPageJump() {
				uni.navigateTo({
					url: "/pages/home/shop/goodsDetail?objId=" + this.item.objId
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import '@/style/mixin.scss';

	.fight_list_content {
		margin: 0rpx 20rpx 20rpx 20rpx;
		padding: 20rpx;
		background: #ffffff;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		border-radius: 8rpx;

		>image {
			width: 260rpx;
			height: 260rpx;
			border-radius: 10rpx;
			flex-shrink: 0;
		}

		.fight_list_details {
			flex: 1;
			display: flex;
			flex-direction: column;
			position: relative;
			align-items: flex-start;
			// margin-left: 22rpx;
			padding: 0rpx 0rpx 0rpx 22rpx;

			.title {
				padding-bottom: 10rpx;
				font-size: 28rpx;
				color: #333333;
			}

			.name {
				padding: 6rpx 12rpx;
				background-image: linear-gradient(90deg, #f4d3a0 0%, #d3ac6b 100%), linear-gradient(#000000, #000000);
				background-blend-mode: normal, normal;
				border-radius: 4rpx;
				text-align: center;
				font-size: 24rpx;
				margin: 10rpx 0rpx 25rpx 0rpx;
				color: #9a5500;
				white-space: nowrap;
			}

			.ensure {
				display: flex;
				justify-content: center;
				align-items: center;
				width: 118rpx;
				height: 35rpx;
				white-space: nowrap;
				padding: 6rpx 12rpx;
				background-color: $viceColor;
				color: $themeColor;
				border-radius: 4rpx;
				font-size: 24rpx;
				margin-bottom: 20rpx;
				margin-top: 10rpx;
				// margin: 25rpx 260rpx 20rpx 0rpx;
			}

			.groupbuyinfo {
				display: flex;
				justify-content: flex-start;
				align-items: center;
				width: 100%;
				.price{
					font-size: 24rpx;
					color: #ff4040;

					>text {
						font-size: 32rpx;
					}
				}

				.number {
					display: flex;
					align-items: center;
					position: relative;
					margin-left: 20rpx;

					>text {
						font-size: 24rpx;
						color: #999999;
						margin-right: 25rpx;
					}

					>image {
						width: 38rpx;
						height: 38rpx;
						border: 2rpx solid #FFFFFF;
						border-radius: 50%;
						margin-left: -15rpx;
					}
				}
			}
		}
	}
</style>
